package com.zshan.clinic.database.model;

import java.io.Serializable;
import java.util.Date;

/**
 * 病历字段表
 */
public class MedicalField implements Serializable {
    /** 字段ID */
    private Long fieldId;

    /** 字段名 */
    private String fieldName;

    /** 字段编码 */
    private String fieldCode;

    /** 字段类型;表示字段的类型1.文本2.日期 */
    private String fieldType;

    /** 字段范围1.通用2西医3中医 */
    private String fieldScope;

    /** 字段样式 */
    private String fieldStyle;

    /** 是否必须 */
    private String isRequired;

    /** 是否输入推荐;如果是需要配置值并且返回给前端 */
    private String isRecom;

    /** 是否语音输入 */
    private String isVoice;

    /** 是否上传图片 */
    private String isImage;

    /** 是否脉象选择 */
    private String isPulse;

    /** 是否周期 */
    private String isCycle;

    /** 是否默认 */
    private String isDefault;

    /** 是否前缀 */
    private String isPrefix;

    /** 排序号 */
    private Integer sortNum;

    /** 启用状态 */
    private String isEnabled;

    /** 删除标识 */
    private String isDelete;

    private Long createUserId;

    /** 创建人 */
    private String createBy;

    /** 创建时间 */
    private Date createTime;

    private Long updateUserId;

    /** 更新人 */
    private String updateBy;

    /** 更新时间 */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Long getFieldId() {
        return fieldId;
    }

    public void setFieldId(Long fieldId) {
        this.fieldId = fieldId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName == null ? null : fieldName.trim();
    }

    public String getFieldCode() {
        return fieldCode;
    }

    public void setFieldCode(String fieldCode) {
        this.fieldCode = fieldCode == null ? null : fieldCode.trim();
    }

    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType == null ? null : fieldType.trim();
    }

    public String getFieldScope() {
        return fieldScope;
    }

    public void setFieldScope(String fieldScope) {
        this.fieldScope = fieldScope == null ? null : fieldScope.trim();
    }

    public String getFieldStyle() {
        return fieldStyle;
    }

    public void setFieldStyle(String fieldStyle) {
        this.fieldStyle = fieldStyle == null ? null : fieldStyle.trim();
    }

    public String getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(String isRequired) {
        this.isRequired = isRequired == null ? null : isRequired.trim();
    }

    public String getIsRecom() {
        return isRecom;
    }

    public void setIsRecom(String isRecom) {
        this.isRecom = isRecom == null ? null : isRecom.trim();
    }

    public String getIsVoice() {
        return isVoice;
    }

    public void setIsVoice(String isVoice) {
        this.isVoice = isVoice == null ? null : isVoice.trim();
    }

    public String getIsImage() {
        return isImage;
    }

    public void setIsImage(String isImage) {
        this.isImage = isImage == null ? null : isImage.trim();
    }

    public String getIsPulse() {
        return isPulse;
    }

    public void setIsPulse(String isPulse) {
        this.isPulse = isPulse == null ? null : isPulse.trim();
    }

    public String getIsCycle() {
        return isCycle;
    }

    public void setIsCycle(String isCycle) {
        this.isCycle = isCycle == null ? null : isCycle.trim();
    }

    public String getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(String isDefault) {
        this.isDefault = isDefault == null ? null : isDefault.trim();
    }

    public String getIsPrefix() {
        return isPrefix;
    }

    public void setIsPrefix(String isPrefix) {
        this.isPrefix = isPrefix == null ? null : isPrefix.trim();
    }

    public Integer getSortNum() {
        return sortNum;
    }

    public void setSortNum(Integer sortNum) {
        this.sortNum = sortNum;
    }

    public String getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(String isEnabled) {
        this.isEnabled = isEnabled == null ? null : isEnabled.trim();
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete == null ? null : isDelete.trim();
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MedicalField other = (MedicalField) that;
        return (this.getFieldId() == null ? other.getFieldId() == null : this.getFieldId().equals(other.getFieldId()))
            && (this.getFieldName() == null ? other.getFieldName() == null : this.getFieldName().equals(other.getFieldName()))
            && (this.getFieldCode() == null ? other.getFieldCode() == null : this.getFieldCode().equals(other.getFieldCode()))
            && (this.getFieldType() == null ? other.getFieldType() == null : this.getFieldType().equals(other.getFieldType()))
            && (this.getFieldScope() == null ? other.getFieldScope() == null : this.getFieldScope().equals(other.getFieldScope()))
            && (this.getFieldStyle() == null ? other.getFieldStyle() == null : this.getFieldStyle().equals(other.getFieldStyle()))
            && (this.getIsRequired() == null ? other.getIsRequired() == null : this.getIsRequired().equals(other.getIsRequired()))
            && (this.getIsRecom() == null ? other.getIsRecom() == null : this.getIsRecom().equals(other.getIsRecom()))
            && (this.getIsVoice() == null ? other.getIsVoice() == null : this.getIsVoice().equals(other.getIsVoice()))
            && (this.getIsImage() == null ? other.getIsImage() == null : this.getIsImage().equals(other.getIsImage()))
            && (this.getIsPulse() == null ? other.getIsPulse() == null : this.getIsPulse().equals(other.getIsPulse()))
            && (this.getIsCycle() == null ? other.getIsCycle() == null : this.getIsCycle().equals(other.getIsCycle()))
            && (this.getIsDefault() == null ? other.getIsDefault() == null : this.getIsDefault().equals(other.getIsDefault()))
            && (this.getIsPrefix() == null ? other.getIsPrefix() == null : this.getIsPrefix().equals(other.getIsPrefix()))
            && (this.getSortNum() == null ? other.getSortNum() == null : this.getSortNum().equals(other.getSortNum()))
            && (this.getIsEnabled() == null ? other.getIsEnabled() == null : this.getIsEnabled().equals(other.getIsEnabled()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFieldId() == null) ? 0 : getFieldId().hashCode());
        result = prime * result + ((getFieldName() == null) ? 0 : getFieldName().hashCode());
        result = prime * result + ((getFieldCode() == null) ? 0 : getFieldCode().hashCode());
        result = prime * result + ((getFieldType() == null) ? 0 : getFieldType().hashCode());
        result = prime * result + ((getFieldScope() == null) ? 0 : getFieldScope().hashCode());
        result = prime * result + ((getFieldStyle() == null) ? 0 : getFieldStyle().hashCode());
        result = prime * result + ((getIsRequired() == null) ? 0 : getIsRequired().hashCode());
        result = prime * result + ((getIsRecom() == null) ? 0 : getIsRecom().hashCode());
        result = prime * result + ((getIsVoice() == null) ? 0 : getIsVoice().hashCode());
        result = prime * result + ((getIsImage() == null) ? 0 : getIsImage().hashCode());
        result = prime * result + ((getIsPulse() == null) ? 0 : getIsPulse().hashCode());
        result = prime * result + ((getIsCycle() == null) ? 0 : getIsCycle().hashCode());
        result = prime * result + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
        result = prime * result + ((getIsPrefix() == null) ? 0 : getIsPrefix().hashCode());
        result = prime * result + ((getSortNum() == null) ? 0 : getSortNum().hashCode());
        result = prime * result + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fieldId=").append(fieldId);
        sb.append(", fieldName=").append(fieldName);
        sb.append(", fieldCode=").append(fieldCode);
        sb.append(", fieldType=").append(fieldType);
        sb.append(", fieldScope=").append(fieldScope);
        sb.append(", fieldStyle=").append(fieldStyle);
        sb.append(", isRequired=").append(isRequired);
        sb.append(", isRecom=").append(isRecom);
        sb.append(", isVoice=").append(isVoice);
        sb.append(", isImage=").append(isImage);
        sb.append(", isPulse=").append(isPulse);
        sb.append(", isCycle=").append(isCycle);
        sb.append(", isDefault=").append(isDefault);
        sb.append(", isPrefix=").append(isPrefix);
        sb.append(", sortNum=").append(sortNum);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}